<ion-view view-title="{{article.name}}">
  <ion-nav-buttons side="secondary">
    <a ui-sref="app.articles-edit-author({articleId : article._id })"
    class="button button-icon ion-ios-compose-outline button-clear"></a>
  </ion-nav-buttons>
  <ion-content>
    <ion-list>
      <div id="map-author" tabindex="0" class="external-map"></div>
      <ion-item>
        <div class="block-highlight">
          <div class="row bottom-border">
            <div class="col col-center col-33">
              <img class="image-avatar-md" 
              ng-src="{{rootUrl}}/{{article.author.avatarFileName}}">
            </div>
            <div class="article-author-name col col-66"> 
                  作者: {{article.author.name}}
            </div>
          </div>
          <div class="row">
            <div class="col col-center">{{article.sections[0].date|date:'yyyy-MM-dd'}}</div>
            <div class="col col-center">里程</div>
            <div class="col col-center">喜欢</div>
          </div>
          <div class="row">
            <div class="col col-center">{{CountDays(article)}}</div>
            <div class="col col-center">{{article.mileage|number}} 公里</div>
            <div class="col col-center">{{CountLikes(article)}}</div>
          </div>
        </div>
      </ion-item>
      <div ng-repeat="sectionGroup in sectionGroups">
        <ion-item class="center-text">{{sectionGroup[0].shortDate}}</ion-item>
        <div class="list card" ng-repeat="section in sectionGroup">
          <div class="item item-body">
            <a class="container" ui-sref='app.articles-section-show-author(
              {articleId : article._id , sectionId: section._id, removeBackViewCount: 0})'>
              <img class="full-image" 
              ng-src="{{rootUrl}}/{{section.imageFileName}}">
              <img ng-src="{{rootUrl}}/cover-image.png" class="tilt-notification-belt-img"
              ng-show="article.coverImageFileName==section.imageFileName" 
              >
            </a>
            <p>{{section.text}}</p>
            <p>
              <i class="icon ion-thumbsup calm" 
              style="font-size: 20px; vertical-align: -3px;"></i>
              <a href="#" class="subdued">{{section.likes.length}} 赞 </a>
              <i class="icon ion-document-text calm" 
              style="font-size: 20px; vertical-align: -3px;"> </i>
              <a href="#" class="subdued">{{section.comments.length}} 评论</a>
            </p>

          </div>
        </div>
      </div>
    </ion-list>
  </ion-content>
  <ion-footer-bar  class="bar-balanced" resize-foot-bar style="padding: 0px;">
    <div class="row" style="padding: 0px;">
      <div class="col bg-thicker" style="padding: 0px; ">
        <a class="button ion-camera button-clear half-bar-button" 
        ng-click="takePicture()"> 随拍</a>
      </div>
      <div class="col bg-highlight" style="padding: 0px; ">
        <a class="button ion-images button-clear text-in-highlight half-bar-button" 
        href="javascript:void(0);"
        > 图库
        <input id="file" name="file" type="file" accept="image/*" capture="camera"
        class="transparent-file" onchange="angular.element(this).scope().pickImage(this)"/>
        </a>
      </div>
    </div>
  </ion-footer-bar>
</ion-view>